<?php $this->load->view('common/head');?>
<?php $this->load->view('common/navbar');?>
<h2 class="fs36 mb54 mt10" style="margin-left: 28px;"><?=$proData['proName']?></h2>
<div class="timetips mb20">
  <span>
    所属双月：
    <?=$proData['timeUnitStr']?></span>
  <span>
    项目类型：
    <?=$proData['proTypeName']?></span>
  <span>
    截至提交时间：
    <?=date("Y-m-d H:i:s", $proData['endTime'])?></span>
    <a role="button" style="float: right;" class="btnbox btn-default btn-xs btn-success" onclick="newWindow('新增动作','<?=printUrl('AdminProAct','add',array('proId'=>$proId))?>')">新增动作</a>
</div>
<div class="partone mt10"></div>
<?php foreach ($actList as $actK => $actV) {?>
<div class="panel panel-default feedbackpart">
  <!-- Default panel contents -->
  <div class="panel-heading"><h3><?=$actV['actTitle']?></h3></div>
  <div class="panel-body col-md-8 request">
    <p class=""><?=$actV['actDesc']?></p>
  </div>
  <div class="panel-body col-md-4 mb40 margin-top-30">
	<a role="button" class="btn btn-default btn-xs btn-success fontWeight" onclick="newWindow('编辑动作','<?=printUrl('AdminProAct','add',array('actId'=>$actV['actId']))?>')">编辑动作</a>
  	<a role="button" class="btn btn-default btn-xs btn-info margin-left-20 fontWeight" onclick="newWindow('新增题目','<?=printUrl('AdminProAct','itemAdd',array('actId'=>$actV['actId']))?>',950,500)">新增题目</a>
  	<a role="button" class="btn btn-default btn-xs btn-warning margin-left-20 fontWeight" onclick="ajaxConfirmSubmit('您确定要删除此动作么?','<?=printUrl('AdminProAct','del')?>',{'actId':<?=(int)$actV['actId']?>})">删除动作</a>
  </div>
  <div class="panel-body partinner">
  <?php foreach ($actV['itemList'] as $itemK => $itemV) {
  	$alias = '<div class="panel-body mb65 margin-top-20">';
  	$alias .= '<a role="button" class="btn btn-default btn-xs btn-success fontWeight" style="margin-right:5px;" onclick="newWindow(\'编辑题目\',\''.printUrl('AdminProAct','itemAdd',array('itemId'=>$itemV['itemId'])).'\',950,500)">编辑题目</a>';
  	$alias .= '<a role="button" class="btn btn-default btn-xs btn-warning margin-left-20 fontWeight" onclick="ajaxConfirmSubmit(\'您确定要删除此题目么?\',\''.printUrl('AdminProAct','itemDel').'\',{\'itemId\':'.(int)$itemV['itemId'].'})">删除题目</a>';
  	$alias .= '</div>';
  	$itemV['alias'] = $alias;
    echo '<div class="parttwo mt10"></div>';
  	printProActItem($itemV);
  } ?>
   </div>
</div>
<?php } ?>
<div class="form-group text-center">
	<button type="button" class="btn btn-primary" onclick="ajaxConfirmSubmit('您确定要此执行反馈项目么?','<?=printUrl('AdminPro','publish')?>',{'proId':<?=$proId?>})">发布反馈</button>
	<button type="button" class="btn btn-primary" onclick="window.location.href='<?=printUrl('AdminPro','index')?>'">取消</button>
</div>
<script type="text/javascript">
// 评分选择
$(".selectinput li").on("click",function(){
  var num = $(this).index();//点击当前评分选择的序号
  var num2 = $(this).parents(".selectinput").find("li").length;//评分选择的长度
  $(this).parents(".selectinput").find(".grade").val(num+1);//评分选择的数值传进影藏input（type="hidden"）里
  $(this).parents(".selectinput").find("li").removeClass('checked');//去掉全部评分选择class样式
  for(var i = 0; i < num+1;i++){
    $(this).parents(".selectinput").find("li").eq(i).addClass('checked');//给当前评分选择前包括自己给个class样式
  }
});
//单选选择
$(".selectradio li").on("click",function(){
  $(this).parents(".selectradio").find("li").removeClass('checked');
  $(this).parents(".selectradio").find("input:checked").parents("li").addClass('checked');
});

//多选选择
$(".selectcheckbox li").on("click",function(){
  $(this).parents(".selectcheckbox").find("li").removeClass('checked');
  $(this).parents(".selectcheckbox").find("input:checked").parents("li").addClass('checked');
});
</script>
<?php $this->load->view('common/foot');?>